{% extends 'base.html' %}

{% block title %}
    用户显示
{% endblock %}
{% block content %}
    <a href="{% url 'user:add_user' %}" class="btn btn-default pull-left">添加用户</a>
    <table class="table table-bordered table-hover table-striped ">
        <thead>
        <tr>
            <td>编号</td>
            <td>用户名</td>
            <td>密码</td>
            <td>性别</td>
            <td>未知数据</td>
            <td>年龄</td>
            <td>创建时间</td>
            <td>操作</td>
        </tr>
        </thead>
        <tbody>
        {% for user in user_list %}
            <tr>
                <td>{{ user.id }}</td>
                <td>{{ user.username }}</td>
                <td>{{ user.password }}</td>
                <td>{{ user.gender }}</td>
                <td>{{ user.new }}</td>
                <td>{{ user.age }}</td>
                <td>{{ user.createDatetime|date:"Y-m-d H:m:s" }}</td>
                <td>
                    <a href="{% url 'user:edit_user' user.id %}" class="btn btn-warning">编辑</a>
                    <a href="{% url 'user:del_user' user.id %}" class="btn btn-danger">删除</a>
                </td>
            </tr>
        {% endfor %}
        </tbody>
    </table>
{% endblock %}